<include file="public@header"/>
</head>
<body>
<div class="wrap">
	<ul class="nav nav-tabs">
		<li><a href="{:url('AdminCategory/index')}">商品分类列表</a></li>
		<li class="active"><a href="{:url('AdminCategory/add')}">添加商品分类</a></li>
	</ul>
	<form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('AdminCategory/addPost')}">
		<div class="form-group">
			<label for="input-name" class="col-sm-2 control-label"><span class="form-required">*</span>上级</label>
			<div class="col-md-6 col-sm-10">
				<select class="form-control" name="parent_id" id="input-parent">
					<option value="0">作为一级分类</option>
					{$categories_tree}
				</select>
			</div>
		</div>
		<div class="form-group">
			<label for="input-name" class="col-sm-2 control-label"><span class="form-required">*</span>商品模型</label>
			<div class="col-md-6 col-sm-10">
				<select class="form-control" name="model_id" id="input-model_id">
					<option value="0">请选择商品模型</option>
					<foreach name="mall_models" item="vo">
						<option value="{$vo.id}">{$vo.name}</option>
					</foreach>
				</select>
			</div>
		</div>
		<div class="form-group">
			<label for="input-name" class="col-sm-2 control-label"><span class="form-required">*</span>商品分类名称</label>
			<div class="col-md-6 col-sm-10">
				<input type="text" class="form-control" id="input-name" name="name">
			</div>
		</div>

		<div class="form-group">
			<label for="js-image" class="col-sm-2 control-label"><span class=""></span>缩略图</label>
			<div class="col-md-6 col-sm-10">
				<input type="hidden" name="thumbnail" id="js-image" value="">
				<a href="javascript:uploadOneImage('图片上传','#js-image');">
					<img src="__TMPL__/public/assets/images/default-thumbnail.png" id="js-image-preview" width="135" style="cursor: hand"/>
				</a>
			</div>
		</div>
		<div class="form-group">
			<label for="input-name" class="col-sm-2 control-label"><span class="form-required">*</span>描述</label>
			<div class="col-md-6 col-sm-10">
				<textarea type="text" class="form-control" id="input-description" name="description"></textarea>
			</div>
		</div>
		<div class="form-group">
			<div class="col-sm-offset-2 col-sm-10">
				<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
			</div>
		</div>
	</form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>